<?php
// echo 'this file will ...';
// var_dump($_POST);
// echo "<pre>";
// print_r($_POST);
// echo "</pre>";
// echo $_GET['stuname'];
// var_dump($_REQUEST);

// // 写入数据
$handle = fopen("file.csv", "a");
$content = $_POST['studentname'] . ',' . $_POST['studentnumber'] . ',' . $_POST['studenturl'] . "\n";
fwrite($handle, $content);
fclose($handle);
//显示数据
include 'display.php';
include'view.php';
//将接收到的数据存入到数据库
$dbc =mysqli_connect('localhost','root','root');
mysqli_set_ocharset($dbc,'utf8mb4');
$query=INSERT INTO `stuinfo/info` (`name `, `class `,`no `,`giturl`)VALUES ($_POST['studentname']','$_POST['studentnumber']','$_POST['studenturl']);


$r=mysqli_query($dbc, $query);

echo '<pre >';
var_dump($r,$query);
echo '</pre>';
?>